Refactor build targets, and add more documentation for our lack of tests
authorXimin Luo <infinity0@debian.org>
Thu, 20 Apr 2017 00:57:41 +0000 (02:57 +0200)
committerXimin Luo <infinity0@debian.org>
Thu, 20 Apr 2017 00:57:41 +0000 (02:57 +0200)
debian/rules

index a2f8ef1a698ee490b4442df56a3ba05949429fce..588f002e09ad19edff2b46ece662723bbf8438e6 100755 (executable)
@@ -25,8 +25,6 @@ DEPSDIR := $(CURDIR)/deps
 
 override_dh_auto_configure:
        cp -a $(CURDIR)/Cargo.lock $(CURDIR)/.Cargo.lock.orig
-
-override_dh_auto_build:
 ifneq ($(filter stage0,$(DEB_BUILD_PROFILES)),)
        # Bootstrap cargo stage0
        ./debian/bootstrap.py \
@@ -51,6 +49,8 @@ endif
                --enable-optimize \
                --local-rust-root=/usr \
                --cargo=$(CURDIR)/cargo-stage0
+
+override_dh_auto_build:
        # Build final cargo binary and docs
        $(MAKE)
 ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
@@ -58,6 +58,14 @@ ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
        cd target/doc/ && rm -f jquery.js && ln -s /usr/share/javascript/jquery/jquery.js
 endif
 
+override_dh_auto_install:
+       # We pick stuff directly from target/
+
+override_dh_auto_test:
+       # We don't run tests at the moment, it can't find "cargotest" crate
+       # which seems to be part of the *rustc* source code :/
+       # https://github.com/rust-lang/rust/tree/master/src/tools/cargotest
+
 override_dh_auto_clean:
        -mv $(CURDIR)/.Cargo.lock.orig $(CURDIR)/Cargo.lock
        dh_auto_clean
@@ -72,10 +80,3 @@ override_dh_auto_clean:
                        $(CURDIR)/Makefile \
                        $(CURDIR)/cargo-stage0 \
                        $(VENDORDIR)
-
-override_dh_auto_install:
-       # We pick stuff directly from target/
-
-override_dh_auto_test:
-       # we don't run tests at the moment due to too many deps
-